import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:jet_rails/jr_utils/jr_snippet.dart';

class JrCommonTile extends StatelessWidget {
  final Widget content;
  final double? height;
  final double? width;
  final VoidCallback? onTap;
  const JrCommonTile({Key? key, required this.content, this.onTap, this.height, this.width}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      behavior: HitTestBehavior.opaque,
      onTap: onTap,
      child: Container(
        height: height ?? 48.h,
        width: width ?? double.infinity,
        padding: const EdgeInsets.all(14),
        decoration: BoxDecoration(borderRadius: BorderRadius.circular(8), gradient: JrSnippets.commonGradient),
        child: content,
      ),
    );
  }
}
